Includes APIs for controlling serial ports to realize communication with serial port device (such as liquid lens) connected to the camera.
More...
Includes APIs for controlling serial ports to realize communication with serial port device (such as liquid lens) connected to the camera.
◆ MV_CC_SerialPort_Open()
| def MvCameraControl_class.MV_CC_SerialPort_Open |
( |
|
self | ) |
|
Opens the serial port.
- Parameters
-
| handle | [IN] It refers to the device handle. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_SerialPort_Write()
| def MvCameraControl_class.MV_CC_SerialPort_Write |
( |
|
self, |
|
|
|
pBuffer, |
|
|
|
nLength, |
|
|
|
pnWriteLen |
|
) |
| |
Writes data to the serial port, allowing a maximum of 512 bytes written at a time.
- Parameters
-
| handle | [IN] It refers to the device handle. |
| pBuffer | [IN] It refers to the data buffer. |
| nLength | [IN] It refers to the data length. |
| pnWriteLen | [OUT] It refers to the actual written data length. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_SerialPort_Read()
| def MvCameraControl_class.MV_CC_SerialPort_Read |
( |
|
self, |
|
|
|
pBuffer, |
|
|
|
nLength, |
|
|
|
pnReadLen, |
|
|
|
nMsec |
|
) |
| |
Reads the serial port data.
- Parameters
-
| handle | [IN] It refers to the device handle. |
| pBuffer | [IN] It refers to the data buffer. |
| nLength | [IN] It refers to the data length. |
| pnReadLen | [IN] It refers to the reader data length. |
| nMsec | [IN] It refers to the timeout duration, unit: millisecond. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_SerialPort_ClearBuffer()
| def MvCameraControl_class.MV_CC_SerialPort_ClearBuffer |
( |
|
self | ) |
|
Clears the received serial port data.
- Parameters
-
| handle | [IN] It refers to the device handle. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_SerialPort_Close()
| def MvCameraControl_class.MV_CC_SerialPort_Close |
( |
|
self | ) |
|
Closes the serial port.
- Parameters
-
| handle | [IN] It refers to the device handle. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.